package tool;

import main.DrawingCanvas;

public class ColorPicker extends Tool{

	public ColorPicker(DrawingCanvas drawingCanvas) {
		super(drawingCanvas);
	}
	public boolean pointerPressed(int x, int y) {
		int i = drawingCanvas.getCol(x);
		int j = drawingCanvas.getRow(y);
		drawingCanvas.setColor(drawingCanvas.getData(i, j),true);
		return false;
	}

	public boolean pointerReleased(int x, int y) {	
		return true;
	}

	public boolean pointerDragged(int x, int y) {
		int i = drawingCanvas.getCol(x);
		int j = drawingCanvas.getRow(y);
		drawingCanvas.setColor(drawingCanvas.getData(i, j),false);
		return false;
	}
}
